import hashlib


def set_md5(value):
    """
    md5加密
    :param value: 需要被加密的数据
    :return:
    """
    secret_key = 'username'.encode('utf-8')
    md5_value = hashlib.md5(secret_key)
    md5_value.update(value.encode('utf-8'))
    return md5_value.hexdigest()